﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<!-- RIGHT COLUMN-->                             
<div id="ja-right" class="column sidebar" style="width:19%">
    <div id="rightpanel">
        <div class="ja-moduletable moduletable  clearfix" id="Mod26">
            <h3><span>Đăng nhập</span></h3>
            <div class="ja-box-ct clearfix">
            <% if (Request.IsAuthenticated)
               { %>
                <ul class="menu">
                    <li class="item7">
                        Hi, <%= Page.User.Identity.Name %>
                    </li>
                    <li class="item8">
                        <a href="<%= Url.Action("LogOff", "Account") %>" class="item7">Đăng xuất</a>
                    </li>
                <%
                    if (Roles.GetRolesForUser(Page.User.Identity.Name)[0].ToUpper().Contains("ADMIN"))
                    {
                %>
                    <li class="item9">
                        <a href="<%= Url.Action("Index", "Admin") %>" class="item8">Vào trang quản trị</a>
                    </li>
                <%
                    }
                %>   
                </ul>
            <% }
               else
               { %>
               <% using (Html.BeginForm("LogOn2", "Account", FormMethod.Post, new { id = "MySubmitForm", @class = "cbLoginForm", Style = "margin: 0px;" }))
                  { %>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="mod_login">
                        <tbody>
                            <tr>
                                <td>
                                    <span id="mod_login_usernametext"><label for="mod_login_username">Tên đăng nhập</label></span><br>
                                    <input type="text" name="username" id="mod_login_username" class="inputbox" size="14"><br>
                                    <span id="mod_login_passwordtext"><label for="mod_login_password">Mật khẩu</label></span><br><span>
                                    <input type="password" name="password" id="mod_login_password" class="inputbox" size="14"></span><br>
                                    <input type="checkbox" name="remember" id="mod_login_remember" value="yes"> <span id="mod_login_remembermetext"><label for="mod_login_remember">Lưu tài khoản</label></span><br>
                                    <span class="cbLoginButtonSpan"><input type="submit" name="Submit" class="button" value="Đăng nhập"></span>
                                </td>
                            </tr>
                            <tr><td><a href="#" class="mod_login">Quên thông tin đăng nhập?</a></td></tr>
                            <tr>
                                <td>
                                    <a href="<%= Url.Action("Register", "Account") %>" class="mod_login">
                                        <img src="../../../Content/Images/Home/dangkyngay.gif" width="130px" height="34px" />
                                    </a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                <% } %>
            <% } %>	
            </div>
        </div>
    <% if (Request.IsAuthenticated)
       { %>
        <div class="ja-moduletable moduletable  clearfix" id="Mod17">
            <h3><span>Auctions User Menu</span></h3>
            <div class="ja-box-ct clearfix">
		        <ul class="menu">
                    <li class="item7">
                        <a href="<%= Url.Action("ThongTinTaiKhoan", "Home", new { username = Page.User.Identity.Name })%>"><span>Thông tin tài khoản (Profile)</span></a>
                    </li>
                <%
                    if (Roles.GetRolesForUser(Page.User.Identity.Name)[0].ToUpper().Contains("ADMIN"))
                    {
                %>
                    <li class="item9">
                        <a href="<%= Url.Action("XemPhienDaTao", "Home", new { idnguoidang = Membership.GetUser(Page.User.Identity.Name).ProviderUserKey })%>"><span>Phiên Đã Tạo</span></a>
                    </li>
                 <% } %>
                    <li class="item10">
                        <a href="<%= Url.Action("DauGiaCuaToi", "Home", new { idnguoidung = Membership.GetUser(Page.User.Identity.Name).ProviderUserKey })%>"><span>Đấu Giá Của Tôi</span></a>
                    </li>
                    <li class="item12">
                        <a href="<%= Url.Action("CacPhienThangCuoc", "Home", new { idnguoidung = Membership.GetUser(Page.User.Identity.Name).ProviderUserKey })%>"><span>Phiên Thắng Cuộc</span></a>
                    </li>
                    <li class="item14">
                        <a href="<%= Url.Action("CacPhienThanhCong", "Home")%>"><span>Các phiên đấu giá thành công</span></a>
                    </li>
                </ul>
    		</div>
    <% } %>
        </div>
    </div>
</div>
<!-- RIGHT COLUMN--> 
